# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Mark Riedesel <mark+alpine@klowner.com>
pkgname=ilmbase
pkgver=2.2.0
pkgrel=5
pkgdesc="Base libraries from ILM for OpenEXR"
url="https://www.openexr.com/"
arch="all"
license="BSD-3-Clause"
makedepends="bash linux-headers"
subpackages="$pkgname-static $pkgname-dev"
source="https://download.savannah.nongnu.org/releases/openexr/ilmbase-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	CONFIG_SHELL=/bin/bash \
		/bin/bash ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	[ "$CARCH" != x86 ] || return 0
	make check
}

package() {
	make DESTDIR="$pkgdir" -C "$builddir" install
}

sha512sums="0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1  ilmbase-2.2.0.tar.gz"
